package com.expert.miniapp.service;

import com.expert.miniapp.dao.*;
import com.expert.miniapp.dto.RecommendationItemDetailDTO;
import com.expert.miniapp.dto.RecommendationResponseDTO;
import java.util.List;
import java.util.Map;

/**
 * 闂佽壈椴搁懝楣冨箖鎼淬劌绠抽柕濞垮妼缁€鍐ㄢ槈閹剧澹樺┑顔惧枛閺屽懘寮拌箛鏇炵闂佽浜介崕杈亹?
 * 闂佸湱绮崝鎺旀閻㈢鏄ラ弶鐐村閼归箖鏌℃径濠傛殻闁革絾鎮傞幆鍐礋椤掑啰鈹涢梺鍛婅壘閻楁劗绮婇鈶╂敠闁归偊鍘奸懙褰掓煠閼恒儱濮囧┑顔界洴閹虫鎸婃径瀣伅AI闂佸搫鎳樼紓姘跺礂濮椻偓瀹曠姾銇愰幒鎴濊祴闂佸憡姊婚崰鏇㈠礂?
 *
 * @author System
 * @since 2024
 */
public interface RecommendationService {

    /**
     * 闂佸吋鍎抽崲鑼躲亹閸ヮ煉绱旈柡宥庡幑閳ь剙顦甸獮鎺楀Ω閵娿儳顦ㄩ梺鍛婂姇閹冲酣顢?
     * 闂佸搫绉烽～澶婄暤娓氣偓楠炴劙宕惰閺嗕即鏌℃担宄板祮闁革絾妞藉畷顏嗕沪閻愵剛绉梻浣瑰絻缁夊爼鎮剧拠娴嬫灃闁哄浂浜炵粈澶娒归悩鏌ヮ€楅柟顔兼川閻氶箖寮拌箛鏇樺亽濠电姍鍕闁煎灚鍨垮鎹愮疀閺冣偓缁ㄦ岸鏌熼幁鎺戝鐎规洘锕㈠畷姗€宕ㄩ褍鏅?
     *
     * @param expertCount 闂佽浜介崝蹇撶暦濮椻偓閹啴宕熼褎缍橀梺娲诲枟閺屟呯箔閹惧灈鍋撶涵鍛厫闁哄棛鍠栭弻?
     * @param achievementCount 闂佽浜介崝蹇撶暦濮椻偓閹啴宕熼褎缍橀梺鐟扮亪閸嬫捇鏌熺€涙ê濮堥柣蹇擃樀瀵偅瀵奸弶鎴烆仭
     * @param instrumentCount 闂佽浜介崝蹇撶暦濮椻偓閹啴宕熼鍕？闂侀潻绲婚崝蹇涱敊閺囩喎绶為柛銉ｅ妽濞堝爼姊?
     * @param laboratoryCount 闂佽浜介崝蹇撶暦濮椻偓閹啴宕熼銈嗘緰婵°倗濮撮懟顖烆敇婵犳艾鏋佸ù鍏兼綑濞?
     * @param otherResourceCount 闂佽浜介崝蹇撶暦濮椻偓閹啴宕熼銏犵翻婵炲濮甸悧鐐电矈椤愨懇鏀﹂柟閭﹀幗濞堝爼姊?
     * @return 闂佸憡鐗曢幊搴ㄥ箚閸儱瑙﹂柛鏇ㄥ弨椤箓鏌熼幁鎺戝鐎规洘顭囬幐褔宕熼鍌滃煃闂佹眹鍔岄崵娓乸闂傚倸妫楀Λ妤呭箖?
     */
    Map<String, Object> getHomepageRecommendations(
        int expertCount,
        int achievementCount,
        int instrumentCount,
        int laboratoryCount,
        int otherResourceCount
    );

    /**
     * AI闂佸搫鎳樼紓姘跺礂濮椻偓瀹曠姾銇愰幒鎴濊祴闁荤姍鍐仾缂侇煈鍣ｉ弫宥夊醇閻斿搫顥愰棅顐㈡搐閸燁垶寮婚悢灏佹灃闁哄浂浜炵粈?
     * 闂佸搫绉烽～澶婄暤娓氣偓濡線鍩€椤掆偓鏁堝〒姘泵犻柣鐘差儏閸熶即寮ˉ顪?API闁哄鏅滅粙鏍€侀幋锕€鐤惧Δ锕€鐏濋崢鎾煕閺嵮呯Ш闁告ǜ鍊濋弫宥囦沪閸婄喎鐝柣搴㈢⊕閿氶柛瀣Ч楠炴帡濡搁妸銉ь槰缂傚倷鐒﹂幐濠氭倶?
     *
     * @param demandId 闂傚倸娲犻崑鎾存叏闁稓妫凞
     * @return 闂佽浜介崝蹇撶暦濡偐纾奸柟鎯ь嚟娴滅枍TO
     * @throws Exception AI闁荤姴顑呴崯浼村极閵堝棗绶為弶鍫亯琚濋梺鐟扮摠閻楁洟宕ｉ悙顒傤浄闁哄诞鍛紳闁?
     */
/**
     * 闂佸搫绉烽～澶婄暤娓氣偓楠炴帡濡搁妸銉ь槰ID闂佸搫琚崕鎾敋濡ゅ懎绠抽柕濞垮妼缁€鍐偣娴ｈ绶茬紓宥呯Ф閹风娀鏁傞挊澶婂
     *
     * @param recommendationId 闂佽浜介崝蹇撶暦濡ょ拏
     * @return 闂佽浜介崝蹇撶暦濡偐纾奸柟鎯ь嚟娴滅枍TO
     */
    RecommendationResponseDTO getRecommendationDetail(String recommendationId);

    /**
     * 闂佸搫绉烽～澶婄暤娓氣偓濡線鍩€椤掆偓鏁堝〒姘泵犻梺鍝勮閸庢挳顢氬Δ鍛闁逞屽墴瀵灚寰勭€ｎ亣鍚傞梺鑹板Г閸旀﹢顢欓崶顏備汗?
     *
     * @param demandId 闂傚倸娲犻崑鎾存叏闁稓妫凞
     * @return 闂佽浜介崝蹇撶暦濡吋濯奸柡澶庢硶缁夊潡鏌涢幒鎿冩畽闁?
     */
    List<Recommendation> getRecommendationsByDemandId(String demandId);

    /**
     * Fetch a single recommendation item by its ID.
     *
     * @param itemId recommendation item ID
     * @return recommendation item entity
     */
    RecommendationItem getRecommendationItemById(String itemId);

    /**
     * 根据推荐项ID查询详细信息（包含用户和需求信息）
     *
     * @param itemId 推荐项ID
     * @return 推荐项详细信息DTO
     */
    RecommendationItemDetailDTO getRecommendationItemDetail(String itemId);
}

